<template>
	<view class="recommendation">
		<!-- menu -->
		<view class="menu_box">
			<view class="menu_item">用户头像</view>
			<view class="menu_item">用户昵称</view>
			<view class="menu_item">用户级别</view>
			<view class="menu_item">用户设备</view>
			<view class="menu_item">团队业绩</view>
		</view>
		<!-- 列表 -->
		<view v-if="peopleList.length">
			<view class="people_list font-wight-600" v-for="(item,index) in peopleList" :key="item.id">
				<image src="../../static/logo.png" class="userimg" mode=""></image>
				<view class="fs-24 nicheng">{{item.name}}</view>
				<view class="fs-24">{{item.level}}</view>
				<view class="fs-24">{{item.number}}台设备</view>
				<view class="fs-20 yeji_box">
					<image class="yeji_img" src="../../static/logo.png" mode=""></image>
					<view>{{item.yeji}}</view>
				</view>
			</view>
		</view>
		<view v-else>
			<view class="nopeople">
				<image src="/static/images/personCenter/noneperson.png" mode=""></image>
				<view class="fs-24" style="color: #ccc;">小主,暂时还没有推荐好友哦</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				peopleList: []
			};
		},
		onShow() {
			this.spread()
		},
		methods: {
			async spread() {
				let res = await this.$http.get('user/get_users_spread', {

				})

			}
		}
	}
</script>

<style lang="less">
	page {
		background-color: #1E2240;
	}

	.recommendation {
		padding: 30rpx;

		.nopeople {
			text-align: center;
			margin-top: 200rpx;

			image {
				width: 260rpx;
				height: 260rpx;
				margin-bottom: 80rpx;
			}
		}

		.people_list {
			display: flex;
			align-items: center;
			justify-content: space-between;
			color: #fff;
			padding: 30rpx 0;
			border-bottom: 1rpx solid #fff;

			.nicheng {
				text-overflow: ellipsis;
				overflow: hidden;
				word-break: break-all;
				white-space: nowrap;
				max-width: 20%;
			}

			.yeji_box {
				display: flex;
				align-items: center;

				.yeji_img {
					width: 40rpx;
					min-width: 40rpx;
					height: 40rpx;
					border-radius: 50%;
					margin-right: 6rpx;
				}
			}

			.userimg {
				width: 60rpx;
				height: 60rpx;
				min-width: 60rpx;
				border-radius: 50%;
				margin-left: 40rpx;
			}
		}

		.menu_box {
			padding: 30rpx;
			border: 4rpx solid transparent;
			background: #272C52;
			background-clip: padding-box;
			border-image: linear-gradient(to left, rgba(0, 20, 255, 1) 0%, rgba(128, 31, 240, 1) 50%, rgba(255, 44, 223, 1) 100%) 10;
			border-radius: 8rpx;
			color: #fff;
			display: flex;
			align-items: center;
			justify-content: space-between;

			// position: relative;

			.menu_item {
				// width: 20%;
				font-size: 20rpx;
			}
		}

		// .menu_box::after{
		// 	position: absolute;
		// 	top: -10rpx;
		// 	bottom: -10rpx;
		// 	left: -10rpx;
		// 	right: -10rpx;
		// 	background: linear-gradient(to left, rgba(0, 20, 255, 1) 0%, rgba(128, 31, 240, 1) 50%, rgba(255, 44, 223, 1) 100%) ;
		// 	content: '';
		// 	z-index: -1;
		// 	border-radius: 8rpx;
		// }
	}
</style>